using AmazeUI.db;
namespace AmazeUI.Bll.GetModel
{
    public class ArticleCommentJson : ArticleComment
    {
        public  ArticleCommentJson()
        {
            
        }

        public ArticleCommentJson(int id)
        {
            using (XtEntities db=new XtEntities())
            {
                var ac = db.ArticleComment.Find(id);
                var articleCommentJson = WebCommon.StringCommand.Static.ParentToSub<ArticleComment, ArticleCommentJson>(ac);
                 
            }
        }
        public ArticleCommentJson(ArticleComment model)
            : this()
        {
            SetModel(model);
        }

        public void SetModel(ArticleComment model)
        {
            this.Id = model.Id;
            this.XtUserId = model.XtUserId;
            this.Comment = model.Comment;
            this.UpTime = model.UpTime;
            this.ArticleId = model.ArticleId;
            this.Score = model.Score;
            this.ParentId = model.ParentId;
            this.Article = model.Article;
            this.XtUser = model.XtUser;
        }


    }
}
